All Questions
10 questions
5votes
1answer
595views
Lingo (word-game) guessing strategy
My friend and I are kind of noobs in Python and are looking for ways to improve. We thought it would be cool if we could get some feedback on the following code. It is for a game named "Lingo&...
1vote
1answer
542views
Finding longest word in a sentence
A problem from Coderbyte. Find the longest word in a sentence after removing the punctuations and if two or more words are of same length return the first word Below is my solution: ...
1vote
1answer
5kviews
String Rotation
I have solved a previous year question of 2018 codevita (link) in Python. Problem Description: Rotate a given String in the specified direction by specified magnitude. After each rotation make a ...
4votes
1answer
264views
Culling strings from a list that are substrings of other list elements
I'm bothered by my answer to this SO question. I'm pretty sure it's more efficient than the sort-and-cull implementations, but I'm having trouble expressing that in a way that I trust. Also, it's ...
2votes
1answer
82views
Length of the longest common sub sequence bottom up
Could I get some feedback on this code? I included a test case as well. This code computes the longest common sub sequence given paired data, it was not part of any challenge I just did it to learn ...
2votes
1answer
45views
Determine if an array of arrays of characters can be concatenated in order, into a substring of haystack
Algorithm: Determine if an array of arrays of characters can be concatenated in order, into a substring of haystack. Example: ...
4votes
1answer
2kviews
Code to implement the Jaro similarity for fuzzy matching strings
Problem This code is meant to solve the problem in this software engineering question. To summarize the issue: given a set of strings that are sort of similar, but not similar enough to use regex upon,...
6votes
4answers
16kviews
Longest substring in alphabetical order
The code is meant to find the longest substring that is in alphabetical order. I would like to know if I can do it more efficiently than I have done here. I am in my first week of my first ...
7votes
2answers
2kviews
Counting the number of continuous palindromic substrings
Given a string of lowercase ASCII characters, find all distinct continuous palindromic sub-strings of it. Here is my code: ...
2votes
3answers
2kviews
Longest common subsequence (LCS) for multiple strings
How would you improve this code? Particularly the check and check_all functions? The time complexity of the algorithm of mlcs is \$O(|\Sigma|MN)\$, where \$\Sigma\$ is the alphabet, M is the number ...